package com.fulihui.wgj.facade.msg;


import com.fulihui.common.enums.PreAuthTypeEnum;
import lombok.Data;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;

/**
 * @author LEVON
 */
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
@Data
public class EventMsg extends BaseMsg {

    private static final long serialVersionUID = 1375367165902363222L;
    
    /**
     * 第三方平台APPID
     */
    @XmlElement(name = "AppId")
    private String appId;

    /**
     * 时间戳
     */
    @XmlElement(name = "CreateTime")
    private Integer createTime;

    /**
     * 消息类型 {@link PreAuthTypeEnum}
     */
    @XmlElement(name = "InfoType")
    private String infoType;

    /**
     * 票据 10分钟推送一次
     */
    @XmlElement(name = "ComponentVerifyTicket")
    private String componentVerifyTicket;

    /**
     * 公众号APPID
     */
    @XmlElement(name = "AuthorizerAppid")
    private String authorizerAppid;

    /**
     * 授权码
     */
    @XmlElement(name = "AuthorizationCode")
    private String authorizationCode;

    /**
     * 授权码过期时间
     */
    @XmlElement(name = "AuthorizationCodeExpiredTime")
    private Integer authorizationCodeExpiredTime;

    //=============================================

    /**
     * 开发者微信号
     */
    @XmlElement(name = "ToUserName")
    private String toUserName;
    /**
     * 发送方帐号（一个OpenID）
     */
    @XmlElement(name = "FromUserName")
    private String fromUserName;
    /**
     * 消息类型 {@link com.fulihui.common.enums.MsgTypeEnum}
     */
    @XmlElement(name = "MsgType")
    private String msgType;
    /**
     * 消息id，64位整型
     */
    @XmlElement(name = "MsgId")
    private String msgId;

    /**
     * 文本消息内容
     */
    @XmlElement(name = "Content")
    private String content;

    /**
     * 图片链接（由系统生成）
     */
    @XmlElement(name = "PicUrl")
    private String picUrl;
    /**
     * 图片消息媒体id，可以调用多媒体文件下载接口拉取数据。
     */
    @XmlElement(name = "MediaId")
    private String mediaId;

    /**
     * 语音格式，如amr，speex等
     */
    @XmlElement(name = "Format")
    private String format;

    /**
     * 语音识别结果，UTF8编码
     */
    @XmlElement(name = "Recognition")
    private String recognition;

    /**
     * 视频消息缩略图的媒体id，可以调用多媒体文件下载接口拉取数据
     */
    @XmlElement(name = "ThumbMediaId")
    private String thumbMediaId;

    /**
     * 地理位置纬度
     */
    @XmlElement(name = "Location_X")
    private String location_X;
    /**
     * 地理位置经度
     */
    @XmlElement(name = "Location_Y")
    private String location_Y;
    /**
     * 地图缩放大小
     */
    @XmlElement(name = "Scale")
    private String scale;
    /**
     * 地理位置信息
     */
    @XmlElement(name = "Label")
    private String label;

    /**
     * 消息标题
     */
    @XmlElement(name = "Title")
    private String title;
    /**
     * 消息描述
     */
    @XmlElement(name = "Description")
    private String description;
    /**
     * 消息链接
     */
    @XmlElement(name = "Url")
    private String url;

    /**
     * 事件类型 {@link com.fulihui.common.enums.EventTypeEnum}
     */
    @XmlElement(name = "Event")
    private String event;

    /**
     * 事件KEY值，qrscene_为前缀，后面为二维码的参数值
     */
    @XmlElement(name = "EventKey")
    private String eventKey;
    /**
     * 二维码的ticket，可用来换取二维码图片
     */
    @XmlElement(name = "Ticket")
    private String ticket;

    /**
     * 纬度
     */
    @XmlElement(name = "Latitude")
    private String Latitude;
    /**
     * 经度
     */
    @XmlElement(name = "Longitude")
    private String Longitude;
    /**
     * 精度
     */
    @XmlElement(name = "Precision")
    private String Precision;

    /**
     * -------------图文消息发送完成回执 start---------
     */

    /**
     * 群发消息的MsgID，上面的是 MsgId
     */
    @XmlElement(name = "MsgID")
    private String massMsgID;

    @XmlElement(name = "Status")
    private String status;

    /**
     * 从提交的openID list中
     * 去掉从未关注过的或不规范的openid（垃圾数据）
     * 后的数量
     */
    @XmlElement(name = "TotalCount")
    private Integer totalCount;

    /**
     * 过滤后，准备发送的粉丝数，
     * （过滤是指特定地区、性别的过滤、用户设置拒收的过滤，取关，用户接收已超4条的过滤）
     * 原则上，FilterCount = SentCount + ErrorCount
     * 所以，微信定义以上几种情况，都不属于 error
     */
    @XmlElement(name = "FilterCount")
    private Integer filterCount;

    /**
     * 发送成功的粉丝数
     */
    @XmlElement(name = "SentCount")
    private Integer sentCount;

    /***
     * 发送成功的粉丝数
     */
    @XmlElement(name = "ErrorCount")
    private Integer errorCount;

    @XmlElement(name = "ResultList")
    private String resultList;

    @XmlElement(name = "ArticleIdx")
    private Integer articleIdx;

    @XmlElement(name = "UserDeclareState")
    private Integer userDeclareState;

    @XmlElement(name = "AuditState")
    private Integer auditState;

    @XmlElement(name = "OriginalArticleUrl")
    private String originalArticleUrl;

    @XmlElement(name = "originalArticleType")
    private Integer OriginalArticleType;

    @XmlElement(name = "CanReprint")
    private Integer canReprint;

    @XmlElement(name = "NeedReplaceContent")
    private Integer needReplaceContent;

    @XmlElement(name = "needShowReprintSource")
    private Integer NeedShowReprintSource;

    @XmlElement(name = "CheckState")
    private Integer checkState;

    /**
     * -------------图文消息发送完成回执end---------
     */
}